import React from 'react'
import { Switch, Route } from 'react-router-dom'
import Layout from '../../components/Layout'
import Header from '../../components/Header'
import Aside from '../../components/Aside'
import Students from '../Students'
import StudentAdd from '../Students/Add'
import StudentDetils from '../Students/Detils'
import Courses from '../Courses'
import CoursesAdd from '../Courses/Add'
import Home from '../Home'

export default function Admin() {
    return (
        <Layout header={<Header />} aside={<Aside />} >
            <Switch>
                <Route path="/" exact component={Home} />
                <Route path="/studens" exact component={Students} />
                <Route path="/studens/add" exact component={StudentAdd} />
                <Route path="/studens/:id" exact component={StudentDetils} />
                <Route path="/courses" exact component={Courses} />
                <Route path="/courses/add" exact component={CoursesAdd} />
            </Switch>
        </Layout>
    )
}
